111
Create Your Own Interface Diagram
111
STEP 3 & 4—draw arrow function continued 2
.BeginArrowheadStyle = msoArrowheadNone
.EndArrowheadStyle = msoArrowheadOpen
.Weight = 2.75
.Transparency = 0.5
‘color arrow
.ForeColor.RGB = RGB(ArrowColor, ArrowColor, ArrowColor) ‘black
End With
Selection.ShapeRange.ZOrder msoSendToBack
Selection.ShapeRange.Name = Sheets(CurrentSheetName).Cells(i, 3).Value
ActiveSheet.Shapes(Sheets(CurrentSheetName).Cells(i, 1).Value & “/” & i), 1
Selection.ShapeRange.ConnectorFormat.BeginConnect ActiveSheet.
Shapes(Sheets(CurrentSheetName).Cells(i, 1).Value), 4
Selection.ShapeRange.ConnectorFormat.EndConnect ActiveSheet.
Shapes(Sheets(CurrentSheetName).Cells(i, 2).Value), 2
End If
‘ ***
If Sheets(CurrentSheetName).Cells(i, 1) = Sheets(CurrentSheetName).Cells(i,
2) Then
adjustment = -0.2
Selection.ShapeRange.Adjustments.Item(1) = adjustment
End If
LabelRow = Range(ActiveSheet.Shapes(Sheets(CurrentSheetName).Cells(i, 1).
Value).TopLeftCell.Address).Row
LabelCol = Range(ActiveSheet.Shapes(Sheets(CurrentSheetName).Cells(i, 1).
Value).TopLeftCell.Address).Column + 4
Dim rng As Range, MyRct As Shape
Label = Sheets(CurrentSheetName).Cells(i, 1).Value & “-1”
Label2 = Sheets(CurrentSheetName).Cells(i, 1).Value & “-2”
If OldShapeBegin And FromConnection = 1 Then
‘ 2 rows up 4 columns left
If ShapeExists(Label2) Then
Selection.ShapeRange.TextFrame2.TextRange.Characters.Text = Selection.
ShapeRange.TextFrame2.TextRange.Characters.Text & Chr(10) & i & “.” &
Sheets(CurrentSheetName).Cells(i, 3).Value
For kk = 1 To LabelObjectNumber
If LabelObject(kk) = Label2 Then
LinesInLabel(kk) = LinesInLabel(kk) + 1
End If
Next
Else
LabelObjectNumber = LabelObjectNumber + 1
LinesInLabel(LabelObjectNumber) = 1
LabelObject(LabelObjectNumber) = Label2
Set rng = Range(Cells(LabelRow - 2, LabelCol - 4), Cells(LabelRow,
LabelCol - 3))
With rng
Set MyRct = ActiveSheet.Shapes.AddLabel(msoTextOrientationHorizontal,
.Left, .Top, .Width, .Height)
MyRct.Name = Sheets(CurrentSheetName).Cells(i, 1).Value & “-2”